<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<div class="sub-menu">
    <div class="sub-menu-heading">主题等级管理</div>
</div>
<form method="post" name="myform" action="<?=cpurl($module,$act)?>">
    <div class="space">
        <table class="maintable" border="0" cellspacing="0" cellpadding="0" trmouse="Y">
            <tr class="altbg1">
                <td width="25">&nbsp;删?</td>
                <td width="45">id</td>
                <td width="230">等级名称</td>
                <td width="*">操作</td>
            </tr>
            <?php if($list) { ?>
            <?php foreach ($list as $key => $val) {?>
            <tr>
                <input type="hidden" name="grades[<?=$val['id']?>][id]" value="<?=$val['id']?>">
                <td><input type="checkbox" name="ids[]" value="<?=$val['id']?>" /></td>
                <td><?=$val['id']?></td>
                <td><input type="text" name="grades[<?=$val['id']?>][name]" value="<?=$val['name']?>" class="txtbox3" /></td>
                <td>[<a href="<?=cpurl($module,$act,'access',array('id'=>$val['id']))?>">权限管理</a>]</td>
            </tr>
            <?php } $list->free_result; } else { ?>
            <tr>
                <td colspan="4">暂时没有</td>
            </tr>
            <?php } ?>
            <tr>
                <td class="altbg1" colspan="2">增加:</td>
                <td class="altbg1" colspan="2"><input type="text" name="newgrade[name]" class="txtbox3" /></td>
            </tr>
        </table>
        <center>
            <input type="hidden" name="dosubmit" value="name" />
            <input type="hidden" name="op" value="post" />
            <input type="button" value="提交更新/增加" class="btn" onclick="easy_submit('myform','post',null)" />&nbsp;
            <?php if($list) { ?>
                <input type="button" value="删除所选" class="btn" onclick="easy_submit('myform','delete','ids[]')" />
            <?php } ?>
        </center>
    </div>
</form>
</div>